package com.hongpu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hongpu.domain.HpProjectWorkPay;
import com.hongpu.domain.HpProjectWorkPayList;
import com.hongpu.dto.TotalReceiptsDto;
import com.hongpu.dto.UnpaidAmountDto;
import com.hongpu.utils.ResultDto;
import com.hongpu.vo.HpProjectWorkPayListNewVo;
import com.hongpu.vo.HpProjectWorkPayListVo;
import com.hongpu.vo.InvoiceTaxAmountStatisticsVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author Michael zhang
 * @description 针对表【hp_project_work_pay_list(项目的回款与支出明细)】的数据库操作Service
 * @createDate 2025-04-25 21:05:56
 */
public interface HpProjectWorkPayListService extends IService<HpProjectWorkPayList> {
    /**
     * 分页
     */
    public IPage<HpProjectWorkPayListVo> selectPageInCome(IPage<?> page, String projectName);
    public List<HpProjectWorkPayListVo> selectListInCome(String projectName);
    public IPage<HpProjectWorkPayListVo> selectPageExpenses(IPage<?> page, String projectName);
    public IPage<HpProjectWorkPayListNewVo> selectPageExpenses2(IPage<?> page, String projectName);
    public List<HpProjectWorkPayListVo> selectListExpenses(String projectName);

    /**
     * 新增数据之前，先根据projectWorkPayId清空数据
     */
    public int deleteByProjectWorkPayId(Long projectWorkPayId);

    /**
     * 新增
     */
    public boolean add(HpProjectWorkPay hpProjectWorkPay);

    public List<HpProjectWorkPayList> getListByProjectWorkPayId(Long projectWorkPayId);

    public List<HpProjectWorkPayList> selectHpProjectWorkPayListByProjectName(String projectName, String incomeAndExpenditureTypes);

    public ResultDto updateProjectWorkPayListData(HpProjectWorkPayList hpProjectWorkPayList);

    public HpProjectWorkPay getHpProjectWorkPayByProjectWorkPayId(Long projectWorkPayId);

    /**
     * 明细数据删除
     */
    public boolean deleteById(Long id);

    public ResultDto oneHpProjectWorkPayListAdd(HpProjectWorkPayList hpProjectWorkPayList);

    /**
     * 收款合计
     */
    public TotalReceiptsDto totalReceipts(String incomeAndExpenditureTypes,String projectName);
    /**
     * 未收款金额
     */
    public ResultDto unpaidAmount(UnpaidAmountDto unpaidAmountDto);
    /**
     * 修改收款时，未收款金额接口
     */
    public ResultDto unpaidAmountForUpdate(UnpaidAmountDto unpaidAmountDto);


    /**
     * 税额统计
     * @param projectWorkPayId   项目的收款或付款数据ID
     * @param incomeAndExpenditureTypes  项目收支类型：0收入 1支出
     * @return
     */
    public List<InvoiceTaxAmountStatisticsVo> collectionTaxStatistics(Long projectWorkPayId,String incomeAndExpenditureTypes);

}
